package com.yanfan.ccapicode.dao;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yanfan.ccapicode.dao.base.iservice.IBaseRepository;
import com.yanfan.ccapicode.dao.entity.FunctionMappingDO;
import com.yanfan.ccapicode.enums.ThirdPartyCloudEnum;
import com.yanfan.ccapicode.web.bean.query.ProductTypeQuery;

import java.util.List;

/**
 * :)
 *
 */
public interface FunctionMappingRepository extends IBaseRepository<FunctionMappingDO> {

    List<FunctionMappingDO> selectByProductIdsAndThirdPartyCloud(List<String> productId, String cloud);

    List<FunctionMappingDO> selectByProductIdsAndThirdPartyCloud(String productId, String cloud);

    Page<FunctionMappingDO> selectPageOrder(ProductTypeQuery query);

    FunctionMappingDO selectByProductThirdCode(String productId, String thirdCode);

    void deleteByProductId(String productId, ThirdPartyCloudEnum cloud);

    void updateNull(List<String> productIds);
    /**
     * 查询产品功能属性映射
     *
     * @param id 产品功能属性映射主键
     * @return 产品功能属性映射
     */
    public FunctionMappingDO selectCcapiFunctionMappingById(Long id);

    /**
     * 查询产品功能属性映射列表
     *
     * @param ccapiFunctionMapping 产品功能属性映射
     * @return 产品功能属性映射集合
     */
    public List<FunctionMappingDO> selectCcapiFunctionMappingList(FunctionMappingDO ccapiFunctionMapping);

}
